/********************************************************************
	copyright (c) by TwT
    @created:	11/21/2011 11:30
    @filename: 	GameObject
    @author:	Gu Yanbo (gybgdhb@gmail.com)
    @brief:	    
*********************************************************************/

#ifndef GAME_LOGIC_H_
#define GAME_LOGIC_H_
#include "render_data.h"
#include <string>
#include "render_dx9.h"
#include "Matrix4x4.h"
class Sprite;
void RenderFrameDX9(Sprite*);
class IRenderable
{
public:
	virtual void Render()=0;
protected:
	
private:
};


class ITouchable
{
public:
	enum{
		T_LINE,
		T_CIRCLE
	}touch_type_;
	union{
		//T_CIRCLE
		struct  
		{
			struct{ int x,y;}m_iPoint;
			float m_fRadius;
		};
		//T_LINE
		struct
		{
			struct{ int x,y;}m_sStart,m_sEnd;
		};

	};


};

class Sprite:public IRenderable{
public:
	Sprite();
	virtual void Render(); 
	virtual void SetPosition(Vertex_VT* _pos);
	virtual void SetPosition(int _x,int _y);
	virtual Vertex_VT GetPosition();
	int stride_x,stride_y;
	Vertex_VT render_pos_;
	struct{
		int x,y;
	}global_pos_;
protected:
	std::string file_name_;


};


#endif //GAME_LOGIC_H_
// 
//History:
//[11/21/2011] <gybgdhb@gmail.com> created